Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of chunked win32-input-mode sequences #16466

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Dec 13, 2023

Even with the previous fixes we still randomly encounter win32-
input-mode sequences that are broken up in exactly such a way that
e.g. lone escape keys are encounters. Those for instance clear the
current prompt. The remaining parts of the sequence are then visible.

This changeset fixes the issue by skipping the entire force-to-ground
code whenever we saw at least 1 win32-input-mode sequence.

Related to #16343

Validation Steps Performed

  • Host a ConPTY inside ConPTY (= double the trouble) with cmd.exe
  • Paste random amounts of text
  • In the old code spurious [..._ strings are seen
  • In the new code they're consistently gone ✅

@lhecker lhecker added Product-Conhost For issues in the Console codebase Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) zInbox-Bug Ignore me! labels Dec 13, 2023
src/terminal/parser/stateMachine.cpp Outdated Show resolved Hide resolved
@DHowett DHowett enabled auto-merge (squash) December 15, 2023 22:55
@DHowett DHowett merged commit bc18348 into main Dec 15, 2023
18 of 20 checks passed
@DHowett DHowett deleted the dev/lhecker/fix-win32im-chunking branch December 15, 2023 23:50
DHowett pushed a commit that referenced this pull request Dec 15, 2023
Even with the previous fixes we still randomly encounter win32-
input-mode sequences that are broken up in exactly such a way that
e.g. lone escape keys are encounters. Those for instance clear the
current prompt. The remaining parts of the sequence are then visible.

This changeset fixes the issue by skipping the entire force-to-ground
code whenever we saw at least 1 win32-input-mode sequence.

Related to #16343

## Validation Steps Performed
* Host a ConPTY inside ConPTY (= double the trouble) with cmd.exe
* Paste random amounts of text
* In the old code spurious `[..._` strings are seen
* In the new code they're consistently gone ✅

(cherry picked from commit bc18348)
Service-Card-Id: 91337332
Service-Version: 1.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Conhost For issues in the Console codebase zInbox-Bug Ignore me!
Projects
Status: To Cherry Pick
Development

Successfully merging this pull request may close these issues.

3 participants